home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-18 | 1.6 KB | 56 lines | [TEXT/PJMM] |
- unit Redraw;
-
- interface
- uses
- Globals;
-
- procedure DrawWindow;
-
- implementation
-
- {Redraw my window}
- {############################ DrawWindow #############################}
-
- { We draw all the contents of our one window, myWindow. Note that this}
- { must include scroll bar areas and the grow icon; the Window Manager}
- { will NOT Handle those for us. Since there are no scroll bars, we}
- { must erase the Region they would be in. Echh.}
-
- procedure DrawWindow;
- var
- arect: Rect; (* rectangle to erase *)
- thePat: PixPatHandle;
- begin
-
- if gColorQDFlag then
- begin
- thePat := GetPixPat(patID);
- FillCRect(mywindow^.portRect, thePat);
- DisposePixPat(thePat);
- end
- else
- begin
- thePat := PixPatHandle(GetResource('ppat', patID));
- FillRect(mywindow^.portRect, thePat^^.pat1Data);
- ReleaseResource(Handle(thePat));
- end;
-
- if false then
- FillRect(mywindow^.portRect, dkGray);
- (* first, fill the window with dark gray; this fills scroll bars, too *)
-
- (* second, erase the scroll bars and draw the grow icon *)
-
- (* erase the horizontal scroll bar *)
- SetRect(arect, mywindow^.portRect.left, mywindow^.portRect.bottom - 15, mywindow^.portRect.right - 15, mywindow^.portRect.bottom); (* cover the horizontal bar *)
- FillRect(arect, white); (* fill with white *)
-
- (* erase the vertical scroll bar *)
- SetRect(arect, mywindow^.portRect.right - 15, mywindow^.portRect.top, mywindow^.portRect.right, mywindow^.portRect.bottom - 15); (* cover the vertical bar *)
- FillRect(arect, white); (* fill with white *)
-
- DrawGrowIcon(mywindow); (* draw the size box in the corner of the window *)
-
- end; (* DrawWindow *)
-
- end.